package com.bbzn.user.client.service.impl;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.bbzn.user.client.dao.role.UserRoleMapper;
import com.bbzn.user.client.dataobject.UserRole;
import com.bbzn.user.client.service.UserRoleService;
@Service
public class UserRoleServiceImpl implements UserRoleService{

    @Resource
    private UserRoleMapper userRoleMapper;

    @Override
    public int insert(UserRole record) {
        return userRoleMapper.insert(record);
    }

    @Override
    public int insertOrUpdate(UserRole record) {
        return userRoleMapper.insertOrUpdate(record);
    }

    @Override
    public int insertOrUpdateSelective(UserRole record) {
        return userRoleMapper.insertOrUpdateSelective(record);
    }

    @Override
    public int insertSelective(UserRole record) {
        return userRoleMapper.insertSelective(record);
    }

    @Override
    public List<UserRole> findByAll(UserRole userRole) {
        return userRoleMapper.findByAll(userRole);
    }

    @Override
    public int batchInsert(List<UserRole> list) {
        return userRoleMapper.batchInsert(list);
    }

    @Override
    public int removeByUserId(Long userId) {
        return userRoleMapper.removeByUserId(userId);
    }

    @Override
    public int getRoleIdByUserId(Long userId) {
        return userRoleMapper.getRoleIdByUserId(userId);
    }

}
